<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Requests\Api\Identity\ListRequest;
use App\Service\IdentityService;

class IdentityController extends Controller
{
    protected $permission;
    protected $fractal;
    protected $identityService;

    public function __construct(
        IdentityService $identityService
    ){
        $this->identityService = $identityService;
    }

    public function list(ListRequest $request) {
        $identityInfo = $this->identityService->list(request(['q']));
        return response($identityInfo);
    }
}
